/*
 * customerBO.java
 *
 * Created on February 15, 2007, 7:55 PM
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package edu.byu.isys413.mystuff;

/**
 *
 * @author abasnet
 */
public class customerBO {
    
    private String firstName;
    private String lasttName;
    private String id; 
    private String email;
    private String phone;
    private String address1;
    private String address2;
    private String street;
    private String state;
    private String city;
    private String zipcode;
    private boolean dirty = false;   //3 tai BO ma yo 2 ta halne ...ani set method ma lekhe dirty = true lekheand get set method for these two variables
    private boolean alreadyInDatabase = false;
    
    /** Creates a new instance of customerBO */
    public customerBO(String id) {
    this.id = id;
    }

    public String getFirstName() {
        return firstName;
    }

    public void setFirstName(String firstName) {
        this.firstName = firstName;
        setDirty(true);
            }

    public String getLasttName() {
        return lasttName;
    }

    public void setLasttName(String lasttName) {
        this.lasttName = lasttName;
        setDirty(true);
    }

    public String getId() {
        return id;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
        setDirty(true);
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
        setDirty(true);
    }

    public String getAddress1() {
        return address1;
    }

    public void setAddress1(String address1) {
        this.address1 = address1;
        setDirty(true);
    }

    public String getAddress2() {
        return address2;
    }

    public void setAddress2(String address2) {
        this.address2 = address2;
        setDirty(true);
    }

    public String getStreet() {
        return street;
    }

    public void setStreet(String street) {
        this.street = street;
        setDirty(true);
    }

    public String getState() {
        return state;
    }

    public void setState(String state) {
        this.state = state;
        setDirty(true);
    }

    public String getCity() {
        return city;
    }

    public void setCity(String city) {
        this.city = city;
        setDirty(true);
    }

    public String getZipcode() {
        return zipcode;
    }

    public void setZipcode(String zipcode) {
        this.zipcode = zipcode;
        setDirty(true);
    }
    
    public String toString(){
        return "FirstName : "+ this.getFirstName()+" \n"+
                "LastName : "+ this.getLasttName()+" \n"+
                "Email    : "+ this.getEmail() +" \n"+
                "Phone    : "+ this.getPhone() +" \n"+
                "Address  : "+ this.getAddress1() + this.getAddress2() + "," +this.getCity()+" "+this.getState()+" , "+this.getZipcode();
        
    
    }

    public boolean isDirty() {
        return dirty;
    }

    public void setDirty(boolean dirty) {
        this.dirty = dirty;
    }

    public boolean isAlreadyInDatabase() {
        return alreadyInDatabase;
    }

    public void setAlreadyInDatabase(boolean alreadyInDatabase) {
        this.alreadyInDatabase = alreadyInDatabase;
    }
}